package com.ithema.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping(value = "/hello")
public class FirstController{
    @RequestMapping(value = "/firstController")
    public String handleRequest(HttpServletRequest request, HttpServletResponse response, Model model) throws Exception {
      //  ModelAndView mav = new ModelAndView();
       // mav.addObject("msg", "这是我的第一个springMVC程序");
        //mav.setViewName("/WEB-INF/jsp/first.jsp");
     //   return mav;
        model.addAttribute("msg","这是我的第一个spring mvc 程序");
        return  "first";
}
}
